package day02;

public class DoubleDemo2 {
    public static void main(String[] args) {
        //3)double:双精度浮点型，8个字节

        //3.14为小数直接量，默认为double类型
        double a = 3.14;
        //3.14F为float型直接量
        float b = 3.14F;


        double c=3.0,d=2.9;
        //0.10000000000000009，发生舍入误差
        System.out.println(c-d);
        double e=6.0,f=4.9;
        //1.0999999999999996，发生舍入误差
        System.out.println(e-f);
        double g=6.0,h=1.9;
        //4.1，没有发生舍入误差
        System.out.println(g-h);
    }
}
